package at.ac.tuwien.dse.health.dashboard.dto;

import java.io.Serializable;

/**
 * @author Bernhard Nickel
 * @author Gregor Schauer
 * @author Dominik Strasser
 */
public class SurgerySlotDTO implements Serializable {
	private long id;
	private String day;
	private String start;
	private String end;
	private String doctor;
	private String type;
	private String hospital;
	private boolean free;
	private String patient;

	public SurgerySlotDTO(long id, String day, String start, String end, String doctor, String type, String hospital, boolean free) {
		this.id=id;
		this.day = day;
		this.start = start;
		this.end = end;
		this.doctor = doctor;
		this.type = type;
		this.hospital = hospital;
		this.free = free;
	}

	public long getId() {
		return id;
	}

	public String getDay() {
		return day;
	}

	public String getStart() {
		return start;
	}

	public String getEnd() {
		return end;
	}

	public String getDoctor() {
		return doctor;
	}

	public String getType() {
		return type;
	}

	public String getHospital() {
		return hospital;
	}

	public boolean isFree() {
		return free;
	}

	public String getPatient() {
		return patient;
	}

	public void setPatient(String patient) {
		this.patient = patient;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		SurgerySlotDTO that = (SurgerySlotDTO) o;

		if (id != that.id) {
			return false;
		}
		if (!day.equals(that.day)) {
			return false;
		}
		if (!end.equals(that.end)) {
			return false;
		}
		if (!start.equals(that.start)) {
			return false;
		}

		return true;
	}

	@Override
	public int hashCode() {
		int result = (int) (id ^ (id >>> 32));
		result = 31 * result + day.hashCode();
		result = 31 * result + start.hashCode();
		result = 31 * result + end.hashCode();
		return result;
	}
}
